package com.pigcloud.sop.gateway.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.FieldNameConstants;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 路由配置
 * </p>
 *
 * @author wangfm
 * @since 2024-01-03
 */
@Data
@FieldNameConstants
@TableName("config_service_route")
@ApiModel("ConfigServiceRoute")
public class ConfigServiceRoute {
    @TableId("id")
    private String id;

    @TableField("service_id")
    private String serviceId;

    @ApiModelProperty("接口名")
    @TableField("name")
    private String name;

    @ApiModelProperty("版本号")
    @TableField("version")
    private String version;

    @ApiModelProperty("路由断言（SpringCloudGateway专用）")
    @TableField("predicates")
    private String predicates;

    @ApiModelProperty("路由过滤器（SpringCloudGateway专用）")
    @TableField("filters")
    private String filters;

    @ApiModelProperty("路由规则转发的目标uri")
    @TableField("uri")
    private String uri;

    @ApiModelProperty("uri后面跟的path")
    @TableField("path")
    private String path;

    @ApiModelProperty("路由执行的顺序")
    @TableField("order_index")
    private Integer orderIndex;

    @ApiModelProperty("是否忽略验证，业务参数验证除外")
    @TableField("ignore_validate")
    private Integer ignoreValidate;

    @ApiModelProperty("状态，0：待审核，1：启用，2：禁用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("是否合并结果")
    @TableField("merge_result")
    private Integer mergeResult;

    @ApiModelProperty("是否需要授权才能访问")
    @TableField("permission")
    private Integer permission;

    @ApiModelProperty("是否需要token")
    @TableField("need_token")
    private Integer needToken;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    private LocalDateTime updateTime;


}
